import time

import akshare as ak
import pandas as pd

# A股股票指数数据 - 历史行情数据 - 东财
# "上证系列指数", "深证系列指数", "指数成份", "中证系列指数"
symbol = "H30184"
df = ak.index_zh_a_hist(symbol=symbol)
date = time.strftime("%Y%m%d", time.localtime())
print(df)
# df.to_excel(f"A股指数-{symbol}-历史行情数据-{date}.xlsx", index=False)
